package com.cvtt.voice.tools;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;


public class VoiceUtil {
	
	// Added by huah in 2012-08-25
	public static byte[] InputStreamToByte(InputStream is) throws IOException {
		ByteArrayOutputStream bytestream = new ByteArrayOutputStream();
		int ch;
		while ((ch = is.read()) != -1) {
			bytestream.write(ch);
		}
		byte outdata[] = bytestream.toByteArray();
		bytestream.close();
		return outdata;
	}
}
